<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>01_函数的环境与作用域原理</title>
</head>

<body>
  <script>
    const a = 1;
    function fun() {
      const b = 2;
      function fn() {
        const c = 3;
        console.log(b)
      }
      fn();
    }
    fun();
    fun();
    fun();
    console.log(b);
  </script>
</body>

</html>